

#include "parser.h"

/*
bool Parser::parse() {
	return E() && this->scanner->currentToken().getEof();
}

bool Parser::E() {
	return T() && EE();
}

bool Parser::EE() {
	if ( scanner->currentToken().getType() == OPERATOR ) {
		scanner->nextToken();
		return T() && EE();
	}
	else {
		scanner->nextToken();
		return true; 
	}
}

bool Parser::T() {
	return F() && TT();
}
	
bool Parser::TT() {
	if ( scanner->currentToken().getType() == OPERATOR ) {
		scanner->nextToken();
		return F() && TT();
	}
	else {
		scanner->nextToken();
		return true; 
	}
}

bool Parser::F() {
	if ( scanner->currentToken().getLexem() == "(") {
		scanner->nextToken();	
		bool tmpE = E();
		
		if (tmpE && scanner->currentToken().getLexem() == ")") {
			scanner->nextToken();
			return true;
		}

		return false;
	}
	
	return false;
}
*/
